package com.cloudkinto.controller.workOrder.reply;


import com.cloudkinto.base.BaseController;
import com.cloudkinto.bo.workOrder.reply.WorkOrderReplyAddBo;
import com.cloudkinto.common.annotations.UserSessionRequired;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.workOrder.WorkOrderReplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 工单回复 前端控制器
 * </p>
 *
 * @author long
 * @since 2025-01-07
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "wms工单回复模块")
@RequestMapping("/api/admin/wms/workOrderReply")
public class WorkOrderReplyWmsController extends BaseController {
    private final WorkOrderReplyService workOrderReplyService;

    @UserSessionRequired
    @PostMapping
    @ApiOperation(value = "工单回复新增", notes = "工单回复新增")
    public SingleResult add(@RequestBody @Validated WorkOrderReplyAddBo req) {
        return SingleResult.success("新增成功", workOrderReplyService.add(req, getCurrentUserId(), "wms"));
    }
}

